let vm = new Vue({
    el:'.tab-content',  //选中整个main
    data:{
        page:{}, //初始化对象     vue建议声明对象同时进行初始化，避免undefinded
        configurations:{}
    },
    methods: {
        selectPage:function (start=1,pageSize=5) {
            //this.page={};
            console.log(this.configurations);
            axios({
                url:`/guguanjia/manager/qualification/selectPage/${start}/${pageSize}`,   //相对路径同样受到base标签影响
                params:this.configurations
            }).then(
                response=>{  //省略function关键字  自动传递上下文中的this
                    //this.apps = response.data.obj.list;
                    this.page = response.data.obj;
                    // console.log(this.page)
                }
            ).catch(error=>{
                console.log(error.message);
            })
        },
        selectAll:function(){
            this.configurations={};
            this.selectPage();
        },
        toUpdate:function (id) {
            layer.obj = id;
            layer.open({
                type: 2,
                title: '更新',
                maxmin: true,
                shadeClose: true, //点击遮罩关闭层
                area : ['800px' , '600px'],
                content: 'qualification/update.html',
                end: ()=>{
                    // layer.msg("更新完成")
                    this.selectAll();//刷新页面
                }
            });
        },
    },
    created:function () {
        this.selectAll();
        // console.log(this.page);
    }
});